<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="common/include :: header('员工管理')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-employee-add">
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">员工姓名：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="name" id="name" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">邮箱：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="email" id="email" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">年龄：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="age" id="age" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">性别：</label>
				<div class="col-sm-8">
					<select class="form-control" name="status" th:with="type=${@dict.getType('sys_user_sex')}">
						<option value="">所有</option>
						<option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">是否超管：</label>
				<div class="col-sm-8">
					<select class="form-control" name="admin" th:with="type=${@dict.getType('si_car_package')}">
						<option value="">所有</option>
						<option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">入职时间：</label>
				<div class="col-sm-8">
					<div class="input-group date">
						<input name="hiredate" class="form-control" placeholder="yyyy-MM-dd HH:mm" type="text" required>
						<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">所在部门：</label>
				<div class="col-sm-8">
					<select class="form-control" name="department.id">
						<option value="">所有</option>
						<option th:each="department : ${departments}"
								th:text="${department.name}"
								th:value="${department.id}"></option>
					</select>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="common/include :: footer" />
	<th:block th:include="common/include :: datetimepicker" />
	<script type="text/javascript">
		var prefix = ctx + "/business/employee";

		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/add", $('#form-employee-add').serialize());
	        }
	    }

		$("input[name='hiredate']").datetimepicker({
			format: "yyyy-mm-dd hh:ii",
			autoclose: true
		});
	</script>
</body>
</html>
